<template>
<div class="audit-panel-group">
    <div class="panel">
        <div class="panel-header bd">
            <div class="bl"></div>
            <div class="title">合同信息</div>
        </div>
        <div class="panel-body">
            <div class="list-group">
                <div class="list-item">
                    <div class="row">
                        <div class="title">订单类型</div>
                        <div class="value">{{ order.order_type_text }}</div>
                    </div>
                </div>
                <div class="list-item">
                    <div class="row">
                        <div class="title">合同金额</div>
                        <div class="value">{{ order.totals }}</div>
                    </div>
                </div>
                <div class="list-item">
                    <div class="row">
                        <div class="title">服务类型</div>
                        <div class="value">{{ order.category.title }}</div>
                    </div>
                </div>
                <div class="list-item">
                    <div class="row">
                        <div class="title">签约公司</div>
                        <div class="value">{{ order.company.title }}</div>
                    </div>
                </div>
                <div class="list-item">
                    <div class="row">
                        <div class="title">成单渠道</div>
                        <div class="value">{{ order.source.title }}</div>
                    </div>
                </div>
                <div class="list-item">
                    <div class="row">
                        <div class="title">签约日期</div>
                        <div class="value">{{ order.sign_date }}</div>
                    </div>
                </div>
                <div class="list-item" v-if="order.contact_no">
                    <div class="row">
                        <div class="title">合同号</div>
                        <div class="value">{{ order.contact_no }}</div>
                    </div>
                </div>
                <div class="list-item">
                    <div class="row">
                        <div class="title">合作模式</div>
                        <div class="value">{{ order.cooperation.title }}</div>
                    </div>
                </div>
                <div class="list-item">
                    <div class="row">
                        <div class="title">跟单销售</div>
                        <div class="value">{{ order.user.realname }}</div>
                    </div>
                </div>
                <div class="list-item">
                    <div class="row">
                        <div class="title">备注</div>
                        <div class="value"></div>
                    </div>
                    <div class="intro">
                        {{ order.remark }}
                    </div>
                </div>

                <div class="list-item">
                    <div class="row">
                        <div class="title">附件</div>
                        <div class="value"></div>
                    </div>
                    <div class="intro">
                        <div v-if="order.files.length > 0" class="order-files">
                            <upload-file-list :file-list="order.files"></upload-file-list>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="panel">
        <div class="panel-header bd">
            <div class="bl"></div>
            <div class="title">举办信息</div>
        </div>
        <div class="panel-body">
            <div class="list-group">
                <div class="list-item">
                    <div class="row">
                        <div class="title">姓名</div>
                        <div class="value">{{ order.bridegroom }}</div>
                    </div>
                </div>
                <div class="list-item">
                    <div class="row">
                        <div class="title">电话</div>
                        <div class="value">{{ order.bridegroom_mobile }}</div>
                    </div>
                </div>
                <div class="list-item">
                    <div class="row">
                        <div class="title">姓名</div>
                        <div class="value">{{ order.bride }}</div>
                    </div>
                </div>
                <div class="list-item">
                    <div class="row">
                        <div class="title">电话</div>
                        <div class="value">{{ order.bride_mobile }}</div>
                    </div>
                </div>
                <div class="list-item">
                    <div class="row">
                        <div class="title">预产期</div>
                        <div class="value">{{ order.event_date }}</div>
                    </div>
                </div>
                <div class="list-item">
                    <div class="row">
                        <div class="title">门店</div>
                        <div class="value">{{ order.store.title }}</div>
                    </div>
                </div>
                <div class="list-item">
                    <div class="row">
                        <div class="title">宴会厅</div>
                        <div class="value">{{ order.hall.title }}</div>
                    </div>
                </div>
                <div class="list-item">
                    <div class="row">
                        <div class="title"></div>
                        <div class="value">{{ order.banquet_type.title }}</div>
                    </div>
                </div>
                <div class="list-item" v-if="order.address">
                    <div class="row">
                        <div class="title">联系地址</div>
                    </div>
                    <div class="intro">
                        {{ order.address }}
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="panel">
        <div class="panel-header bd">
            <div class="bl"></div>
            <div class="title">客资信息</div>
        </div>
        <div class="panel-body">
            <div class="list-group">
                <div class="list-item">
                    <div class="row">
                        <div class="title">客户姓名</div>
                        <div class="value">{{ order.customer.fullname }}</div>
                    </div>
                </div>
                <div class="list-item">
                    <div class="row">
                        <div class="title">渠道</div>
                        <div class="value">{{ order.customer.source.title }}</div>
                    </div>
                </div>
                <div class="list-item">
                    <div class="row">
                        <div class="title">创建人</div>
                        <div class="value">{{ order.customer.creator.realname }}</div>
                    </div>
                </div>
                <div class="list-item">
                    <div class="row">
                        <div class="title">客服</div>
                        <div class="value">{{ order.allocate.user.realname }}</div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</template>

<script>
import uploadFileList from '@/components/files/index';

export default {
    name: "AuditOrder",
    components: {
        uploadFileList
    },
    props: {
        order: {
            type: Object,
            default: function () {
                return {
                    id: 0,
                    category_id: "",
                    category: {
                        id: "",
                        title: "",
                    },
                    company_id: 0,
                    company: {
                        id: "",
                        title: "",
                    },
                    source_id: 0,
                    source: {
                        id: "",
                        title: "",
                    },
                    cooperation: {
                        id: "",
                        title: "",
                    },
                    user: {
                        id: "",
                        realname: ""
                    },
                    customer: {
                        id: '',
                        fullname: '',
                        creator: {
                            id: '',
                            realname: '',
                        },
                        source: {
                            id: '',
                            title: ''
                        }
                    },
                    allocate: {
                        id: '',
                        user_id: '',
                        user: {
                            id: '',
                            realname: '',
                        },
                    },
                    files: [],
                };
            }
        }
    },
    data() {
        return {

        };
    },
    methods: {

    }
}
</script>
